package com.jjx.controller;

import com.jjx.domain.Result;
import com.jjx.domain.Role;
import com.jjx.domain.SysUser;
import com.jjx.service.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("role")
public class RoleController {

    @Autowired
    private IRoleService iRoleService;

    @RequestMapping("findAll")
    public Result findAll(Integer id){
        List<Role> roleList = iRoleService.findAllById(id);
        Result rs  = new Result();
        rs.setData(roleList);
        return rs;
    }
}
